<template>
	<view class="root-view">
		<view class="device-layout-block">
			<view class="device-layout-mod">
				<view class="device-layout-mbody">
					<view class="textinfo-box">
						<view class="textinfo-title">快来共享设备，</view>
						<view class="textinfo-desc">和家人一起享受智能生活吧</view>
					</view>
					<view class="uform-box u-p-b-64">
						<u-form class="u-border-top" :model="form" ref="uForm">
							<u-form-item left-icon="phone">
								<u-input v-model="form.mobile" type="text" placeholder="手机号" />
							</u-form-item>
						</u-form>
					</view>
					
				</view>
				<view class="device-layout-mfoot ">
					<view class="device-layout-btns">
						<view class="btn-cell">
							<button class="coco-btn theme round lg shadow" @click="shareEquiment();">确定</button>
						</view>
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					mobile: '',
					device_id:this.$Route.query.device_id
				},
			};
		},
		methods:{
			jump(path) {
				this.$tools.routerTo(path);
			},
			shareEquiment(){
				this.$post("api/device/share_equiment",this.form).then(res => {
					if(res.code == 1){
						this.$u.toast(res.msg);
					}
				})
			}
		},
		onLoad() {
		}
	}
</script>

<style lang="scss">
	@import "../device/css/device.scss";
</style>
